home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / MacApp Documentation / MacApp.TECH$ Archives / 1990 / Jan 90 / MacApp.Tech$ 1⁄19⁄90 / 0463-Re TGrayMap and 32-B-Jan90 < prev    next >
Encoding:
Text File  |  1991-03-06  |  1.6 KB  |  42 lines  |  [TEXT/GEOL]

  1. Item    3355355                         18-Jan-90        23:06
  2.  
  3. From:   D4682                           Marx, Peter,PRT
  4.  
  5. To:     D3904                           The Complete PC,PRT
  6.         MACAPP.TECH$                    MacApp Technical
  7.  
  8. Sub:    Re: TGrayMap and 32-Bit QD
  9.  
  10. Perry,
  11.  
  12. If I am correctly understanding you, you would like to take an already dithered
  13. image and convert it to grays...? If so, CopyBits() won't help you; it will
  14. only go from a continuous tone image to a dithered image. The only way that
  15. CopyBits would help you in such a case is if it is going from a large image to
  16. a small one at which point it would do pixel averaging.
  17.  
  18. If you want to go to a dithered image, then draw the continuous tone image into
  19. an offscreen buffer 32-bits deep. Then CopyBits() out of that buffer using the
  20. ditherCopy drawing mode. This will work on any machine supported 32-bit
  21. QuickDraw.
  22.  
  23. Depending on the dither algorithm, you would probably want to do pixel
  24. averaging (ie. a pattern dither with a 4x4 pattern should have those eight
  25. pixels averaged to produce one gray pixel in the outgoing image.)
  26.  
  27. If the dithering algorithm is one of the error diffusion (ie. blue noise
  28. dithering), then the problem becomes much more complicated. So complicated, in
  29. fact, that you could write a thesis on it.
  30.  
  31. If you want more information, feel free to call me at 213/471-2754.
  32.  
  33. Peter Marx
  34. UCLA Dept. of Medicine.
  35.  
  36.  
  37. P.S. Are your gray-level images 2-bit, 4-bit, 8, 12, or 16 bits deep?
  38.  
  39. P.P.S. DoubleVision is hardly the 32-bit QuickDraw program to end all 32-bit QD
  40. programs....!
  41.  
  42.